package pl.enigmatic.validation.util;

import pl.enigmatic.validation.SimpleValidator;


public abstract class BooleanValidator implements SimpleValidator<Boolean> {

	public static final SimpleValidator<Boolean> NOT_NULL = new NotNull<Boolean>();

	public static final BooleanValidator TRUE = new BooleanValidator() {

		@Override
		public boolean isValueValid(final Boolean val) {
			return NOT_NULL.isValueValid(val) && val;
		}
	};
	public static final BooleanValidator FALSE = new BooleanValidator() {

		@Override
		public boolean isValueValid(final Boolean val) {
			return NOT_NULL.isValueValid(val) && !val;
		}
	};

	private BooleanValidator() {}

}
